home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20021006-20030409
/
000096_fdc@columbia.edu_Sat Nov 16 15:44:32 EST 2002.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
3KB
|
61 lines
Article: 13862 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
From: fdc@columbia.edu (Frank da Cruz)
Newsgroups: comp.os.linux.misc,comp.protocols.kermit.misc
Subject: Re: recursive rm | wildcards | common file extension
Date: 16 Nov 2002 15:43:33 -0500
Organization: Columbia University
Lines: 44
Message-ID: <ar6all$djs$1@watsol.cc.columbia.edu>
References: <3dd576c6.90242792@newsstand.cit.cornell.edu> <m265uyl2n6.fsf@mother.paradise.lost> <zexB9.839197$Ag2.28340611@news2.calgary.shaw.ca> <ar68n0$4g3$1@news.uni-stuttgart.de>
NNTP-Posting-Host: watsol.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1037479415 18825 128.59.39.139 (16 Nov 2002 20:43:35 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 16 Nov 2002 20:43:35 GMT
Xref: newsmaster.cc.columbia.edu comp.os.linux.misc:571649 comp.protocols.kermit.misc:13862
In article <ar68n0$4g3$1@news.uni-stuttgart.de>,
Hansjoerg Lipp <hjlipp@web.de> wrote:
: Richard Pitt wrote:
: > I use
: > find . -name "*.abc" -print | xargs rm -f
:
: You should use
:
: find . -name "*.abc" -print0 | xargs -0 rm -f
:
: to prevent that file names with spaces are interpreted as several files
: by the xargs command.
:
As noted, you can delete files recursively using find, xargs, and rm --
three programs, whose syntax and interactions might vary from one Unix
version to another, and as you can see from this discussion, the details
and quoting rules can be confusing. The same thing can be done in a more
straightforward way at the C-Kermit> prompt:
delete /recursive *.abc
Plus you get a lot more options for selecting which files to delete:
C-Kermit>delete ? File specification; or switch, one of the following:
/after: /except: /nodotfiles /not-before: /summary
/ask /heading /noheading /page /tree
/before: /larger-than: /nolist /recursive /type:
/directories /list /nopage /simulate
/dotfiles /noask /not-after: /smaller-than:
C-Kermit>delete
Dates, sizes, etc; whether to include or exclude dot files and directory
files; exception lists; optional interactive prompting; various listing
options. Of particular interest is a simulation mode, allowing you to see
which files WOULD be deleted without actually deleting them. Another
unique feature is the /TYPE:{TEXT,BINARY,ALL} option, which lets you pick
only text files or only binary files for deletion (in addition to your
other criteria). C-Kermit is here:
http://www.columbia.edu/kermit/ckermit.html
- Frank